package com.cms.jdbc;

import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.sql.ResultSet;
import java.util.Properties;

public class ResMethodFactory {
	private static Properties prop;
	static {
		prop=new Properties();
		
		InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream("com//cms//jdbc//RsMethod.properties");
		
		try {
			prop.load(in);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
	
	
	public static Method getMethod(Field field) throws NoSuchMethodException, SecurityException {
		Method method=null;
		method=ResultSet.class.getDeclaredMethod(prop.getProperty(field.getType().getName()),String.class);
		return method;
		
	}
}
